<template>
  <div class="mod-config">
    <el-button type="primary" @click="goback" style="margin-bottom: 20px;">返回</el-button>
    <div class="total" style="margin-bottom: 20px;">
      <div>累计投放数据：访问次数 <span>{{totalVo.visits}}</span> 访问人数 <span>{{totalVo.uv}}</span> 提交表单人数 <span>{{totalVo.submitFormCount}}</span> 新增注册用户 <span>{{totalVo.userRegistrationNum}}</span> 新增会员用户 <span>{{totalVo.memberRegistrationNum}}</span> 注册转化率 <span>{{totalVo.userRegisNumConversion}}</span>  会员转化率 <span>{{totalVo.memberRegisNumConversion}}</span></div>
    </div>
    <el-table
      :data="dataList"
      border
      v-loading="dataListLoading"
      style="width: 100%;"
    >
      <el-table-column prop="showTime" header-align="center" align="center" label="时间"></el-table-column>
      <el-table-column prop="visits" header-align="center" align="center" label="访问次数"></el-table-column>
      <el-table-column prop="uv" header-align="center" align="center" label="访问人数"></el-table-column>
      <el-table-column prop="submitFormCount" header-align="center" align="center" label="提交表单人数"></el-table-column>
      <el-table-column prop="userRegistrationNum" header-align="center" align="center" label="新增注册用户"></el-table-column>
      <el-table-column prop="memberRegistrationNum" header-align="center" align="center" label="新增会员用户"></el-table-column>
      <el-table-column prop="userRegisNumConversion" header-align="center" align="center" label="注册转化率"></el-table-column>
      <el-table-column prop="memberRegisNumConversion" header-align="center" align="center" label="会员转化率"></el-table-column>
    </el-table>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        visibleIntegralList: false,
        dataForm: {},
        dataList: [],
        dataListLoading: false,
        totalVo: {}
      }
    },
    methods: {
      // 获取数据列表
      init(id) {
        this.dataListLoading = true
        this.dataForm.id = id
        this.$http({
          url: this.$http.adornUrl('/market/marketad/getAdStatisticsData'),
          method: 'get',
          params: this.$http.adornParams(this.dataForm)
        }).then(({ data }) => {
          if (data && data.code === 0) {
            this.dataList = data.adStatisticsData
            this.totalVo = data.totalVo
          } else {
            this.dataList = []
            this.totalPage = 0
          }
          this.dataListLoading = false
        })
      },
      goback() {
        this.$emit('goBack')
      }
    }
  }
</script>
<style>
  .margin_10{
    margin-bottom: 10px;
  }
  .text_r{
    text-align: right;
    padding-right: 15px;
  }
  .inineBlock{
    display: inline-block;
  }
  img{
    width: 100%;
    height: auto;
  }
  .total span{
    color: #52b0a3;
    margin-right: 20px;
    font-size: 18px;
  }
</style>
